package com.jeff.tianti.cms.dao;

import com.jeff.tianti.cms.entity.ConsultCompliance;
import com.jeff.tianti.cms.entity.Media;
import com.jeff.tianti.common.dao.CommonDao;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author xujianfang
 * @desc MediaDao�ӿ�
 * @date 2019-07-08
 */
public interface MediaDao extends MediaDaoCustom, CommonDao<Media, String> {

    @Query(" from Media m where m.auditFlag = 2 and m.deleteFlag = 0 order by m.updateDate desc ")
    Page<Media> findAllNoDel(Pageable pageable);
    @Query(" from Media m where m.uid = ?1 and m.deleteFlag = 0 order by m.updateDate desc ")
    Page<Media> findByUid(String uid, Pageable pageable);
}
